package com.zzz.friend.controller.exam;

import com.zzz.common.core.controller.BaseController;
import com.zzz.common.core.domain.TableDataInfo;
import com.zzz.friend.domain.exam.dto.ExamQueryDTO;
import com.zzz.friend.domain.exam.vo.ExamVO;
import com.zzz.friend.service.exam.ExamService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @BelongsProject: oj-project
 * @BelongsPackage: com.zzz.friend.controller.exam
 * @Author: zhai
 * @CreateTime: 2025-11-01  13:19
 * @Description: TODO
 * @Version: 1.0
 */
@Tag(name = "竞赛端")
@RequestMapping("/exam")
@RestController
public class ExamController extends BaseController {

    @Autowired
    private ExamService examService;

    @GetMapping("/semiLogin/list")
    @Operation(summary = "查询竞赛列表", description = "查询竞赛列表")
    @ApiResponse(responseCode = "1000", description = "操作成功")
    @ApiResponse(responseCode = "2000", description = "操作失败")
    public TableDataInfo list(ExamQueryDTO examQueryDTO) {
        return getDataTable(examService.list(examQueryDTO));
    }

    @GetMapping("/semiLogin/redis/list")
    @Operation(summary = "redis的查询竞赛列表🥵", description = "查询竞赛列表")
    @ApiResponse(responseCode = "1000", description = "操作成功")
    @ApiResponse(responseCode = "2000", description = "操作失败")
    public TableDataInfo getRedisList(ExamQueryDTO examQueryDTO) {
        return examService.redisList(examQueryDTO);
    }
}
